<template>
	<view class="index-page">
		<view class="welcome-bg" v-if="showWelcomeBg">
			<image class="welcome-ic"
			 src="../../static/bg_welcome.png" mode="widthFix"></image>
		</view>
		
		<view class="column-container width-100p" style="position: relative;" v-if="!showWelcomeBg">
			<view class="top-box" @click="gotoAddress">
				<image src="../../static/ic_location.png" 
				class="location-ic"></image>
				<text class="location-text">
					{{addressStr}}</text>
				<image class="arrow-ic" src="../../static/ic_arrow_right_grey.png"></image>
			</view>
			<view class="top-img-box" v-if="inviteUserId != 10676">
				<swiper class="swiper-box" 
					:indicator-dots="bannerList.length > 1"
					autoplay
					interval="2000"
					circular
					indicator-active-color="#FFFFFF"
					>
					<swiper-item v-for="(bannerItem , bannerIndex) in bannerList" :key="bannerIndex"
						@click="handleClickBanner(bannerItem)">
						<image class="top-container-img" :src="bannerItem.imgUrl"></image>
					</swiper-item>
				</swiper>
			</view>
			
			<view class="coupon-main" v-if="inviteUserId != 10676">
				<image class="coupon-bg" :src="couponBgUrl"></image>
				<view class="coupon-box" >
					<view class="coupon-item" @click="handleClickCouponItem(0)">
						<image class="coupon-img" src="../../static/ic_meituan_coupon.png"></image>
						<text class="font-333-26">美团红包</text>
						<text class="font-999-20 mt-4">神券红包</text>
					</view>
					<view class="coupon-item" @click="handleClickCouponItem(1)">
						<image class="coupon-img" src="../../static/ic_ele_coupon.png"></image>
						<text class="font-333-26">饿了么红包</text>
						<text class="font-999-20 mt-4">红包补贴</text>
					</view>
					<view class="coupon-item" @click="handleClickCouponItem(2)">
						<image class="coupon-img" src="../../static/ic_plateform_group.png"></image>
						<text class="font-333-26">内部福利群</text>
						<text class="font-999-20 mt-4">活动早知道</text>
					</view>
					<view class="coupon-item" @click="handleClickCouponItem(3)">
						<image class="coupon-img" src="../../static/ic_book.png"></image>
						<text class="font-333-26">新手教程</text>
						<text class="font-999-20 mt-4">新人必看</text>
					</view>
				</view>
			</view>
			
			<view :class="[hasFlow ? 'act-cate-box-fixed' : 'act-cate-box']" v-if="inviteUserId != 10676">
				<view v-if="chosenCate == '全部品类'" :class="[hasFlow ? 'all-cate-box-grey' : 'all-cate-box-white']" @click="changeAllCateShow">
					<text class="font-666-24">{{chosenCate}}</text>
					<image class="arrow-down" src="../../static/ic_arrow_down_grey.png"></image>
				</view>
				
				<view v-else class='all-cate-box-grey' @click="changeAllCateShow" style="background: #FFC01F;">
					<text class="font-333-24 font-weight-600">{{chosenCate}}</text>
					<image class="arrow-down" src="../../static/ic_arrow_down_grey.png"></image>
				</view>
				
				<view :class="[hasFlow ? 'grey-cate-box' : 'white-cate-box']"
				 v-if="checkHigh == 0" @click="changeCheckHigh(1)">
					<text class="font-666-24">高额奖励</text>
				</view>
				<view class="green-cate-box" v-if="checkHigh == 1" @click="changeCheckHigh(0)">
					<text class="font-333-24 font-weight-600">高额奖励</text>
				</view>
				
				<view :class="[hasFlow ? 'grey-cate-box' : 'white-cate-box']"
				 v-if="checkComment == 0" @click="changeCheckComment(1)">
					<text class="font-666-24">无需评价</text>
				</view>
				<view class="green-cate-box" v-if="checkComment == 1" @click="changeCheckComment(0)">
					<text class="font-333-24 font-weight-600">无需评价</text>
				</view>
				
				<view :class="[hasFlow ? 'grey-cate-box' : 'white-cate-box']"
				v-if="checkUse == 0" @click="changeCheckUse(1)">
					<text class="font-666-24">只看可抢</text>
				</view>
				<view class="green-cate-box" v-if="checkUse == 1" @click="changeCheckUse(0)">
					<text class="font-333-24 font-weight-600">只看可抢</text>
				</view>
				
				<view :class="[hasFlow ? 'grey-cate-box' : 'white-cate-box']" @click="gotoSearchAct">
					<image src="../../static/ic_search.png" class="search-ic"></image>
					<text class="font-666-24">搜索</text>
				</view>
			</view>
			
			<view class="act-cate-box-fixed"
			 v-if="inviteUserId == 10676">
				<view v-if="chosenCate == '全部品类'" :class="[hasFlow ? 'all-cate-box-grey' : 'all-cate-box-white']" @click="changeAllCateShow">
					<text class="font-666-24">{{chosenCate}}</text>
					<image class="arrow-down" src="../../static/ic_arrow_down_grey.png"></image>
				</view>
				
				<view v-else class='all-cate-box-grey' @click="changeAllCateShow" style=" #FFC01F">
					<text class="font-333-24 font-weight-600">{{chosenCate}}</text>
					<image class="arrow-down" src="../../static/ic_arrow_down_grey.png"></image>
				</view>
				
				<view :class="[hasFlow ? 'grey-cate-box' : 'white-cate-box']"
				 v-if="checkHigh == 0" @click="changeCheckHigh(1)">
					<text class="font-666-24">高额奖励</text>
				</view>
				<view class="green-cate-box" v-if="checkHigh == 1" @click="changeCheckHigh(0)">
					<text class="font-333-24 font-weight-600">高额奖励</text>
				</view>
				
				<view :class="[hasFlow ? 'grey-cate-box' : 'white-cate-box']"
				 v-if="checkComment == 0" @click="changeCheckComment(1)">
					<text class="font-666-24">无需评价</text>
				</view>
				<view class="green-cate-box" v-if="checkComment == 1" @click="changeCheckComment(0)">
					<text class="font-333-24 font-weight-600">无需评价</text>
				</view>
				
				<view :class="[hasFlow ? 'grey-cate-box' : 'white-cate-box']"
				v-if="checkUse == 0" @click="changeCheckUse(1)">
					<text class="font-666-24">只看可抢</text>
				</view>
				<view class="green-cate-box" v-if="checkUse == 1" @click="changeCheckUse(0)">
					<text class="font-333-24 font-weight-600">只看可抢</text>
				</view>
				
				<view :class="[hasFlow ? 'grey-cate-box' : 'white-cate-box']" @click="gotoSearchAct">
					<image src="../../static/ic_search.png" class="search-ic"></image>
					<text class="font-666-24">搜索</text>
				</view>
			</view>
			
			<!-- 活动列表 -->
			<view :class="[inviteUserId == 10676 ? 'list-box-invite' : 'list-box']"
			 v-if="!showNoLocation">
				<view class="column-container" v-if="dataList.length > 0">
					<view class="data-item" v-for="(item , index) in dataList" :key="index" >
						<image src="../../static/ic_single_tag.png" class="single-tag"
						 v-if="item.checkNew == 1"></image>
						<view class="row-container width-100p">
							<view class="item-img-box">
								<image class="item-img" :src="item.logo"></image>
								<text class="brand-tag" v-if="item.checkBrand">品牌</text>
							</view>
							
							<view class="column-container-between height-190 width-100p">
								<view class="column-container">
									<text class="shop-name">{{item.shopName}}</text>
									<image :src="item.brandImg" class="brand-img" mode="heightFix" v-if="inviteUserId != 10676"></image>
									<view  class="brand-img"  v-else></view>
								</view>
								<text class="font-999-26">
								 距您：{{item.distanceStr}}</text>
							</view>
						</view>
						
						<view class="column-container width-100p">
							<view class="act-item" v-for="(actItem , actIndex) in item.activeList"
							:key="actIndex" @click="gotoActDel(actItem , item.distanceStr)">
								<image class="act-bg" v-if="actItem.checkFar != 1 && actItem.checkStatus == 1 
								&& actItem.surplusCount == 1" src="../../static/bg_active_last.png"></image>
								<image class="act-bg" v-else-if="actItem.checkFar != 1 && actItem.checkStatus == 1
								&& actItem.surplusCount > 1" src="../../static/bg_active_last_yellow.png"></image>
								<image class="act-bg" v-else src="../../static/bg_active_grey.png"></image>
								
								<view class="row-container" style="z-index: 40;">
									<text class="font-333-22">{{actItem.startTime}}-{{actItem.endTime}}</text>
									<text class="red-tag" v-if="actItem.id" >满{{actItem.fullAmount}}奖{{actItem.returnAmount}}</text>
									<!-- <text class="red-tag" v-else>最高奖{{actItem.returnAmountBak}}</text> -->
									<text class="red-tag" style="padding: 0rpx 12rpx" v-else>返{{actItem.heightRate}}%</text>
									
									<text class="blue-tag" v-if="actItem.checkComment">无需评价</text>
									
								</view>
								
								<view class="row-container" style="z-index: 40;">
									<view class="column-container-center mr-30">
										<progress class="progress-bar" active-color="#CBCBCB"
										backgroundColor="#F0F0F0" v-if="actItem.checkFar == 1"
										:percent="(actItem.surplusCount / actItem.joinCount) * 100" 
										border-radius="5"></progress>
										
										<progress class="progress-bar" active-color="#CBCBCB"
										backgroundColor="#F0F0F0" v-else-if="actItem.checkFar != 1 && actItem.surplusCount == 0"
										:percent="(actItem.surplusCount / actItem.joinCount) * 100" 
										border-radius="5"></progress>
										
										<progress class="progress-bar" active-color="#FF5454"
										backgroundColor="#FFDADA" v-else-if="actItem.checkFar != 1 && actItem.surplusCount == 1"
										:percent="(actItem.surplusCount / actItem.joinCount) * 100" 
										border-radius="5"></progress>
										
										<progress class="progress-bar" active-color="#FFD100"
										backgroundColor="#FDEFBF" v-else
										:percent="(actItem.surplusCount / actItem.joinCount) * 100" 
										border-radius="5"></progress>
										
										<view class="row-container mt-12">
											<text class="font-ff5454-22 font-weight-600" v-if="actItem.surplusCount == 1">最后一席</text>
											<text class="font-999-22" v-else-if="actItem.surplusCount == 0">全部售罄</text>
											<text class="font-333-22 font-weight-600" v-else-if="actItem.surplusCount / actItem.joinCount > 0.2">剩余充足</text>
											<text class="font-333-22 font-weight-600" v-else>即将报满</text>
										</view>
									</view>
									
									<view class="buy-box">
										<image class="buy-bg" v-if="actItem.checkFar != 1 && actItem.checkStatus == 1
										&& actItem.surplusCount == 1" src="../../static/bg_buy_btn.png"></image>
										<image class="buy-bg" v-else-if="actItem.checkFar != 1 && actItem.checkStatus == 1
										&& actItem.surplusCount > 0" src="../../static/bg_buy_btn_yellow.png"></image>
										<image class="buy-bg" v-else-if="actItem.checkFar != 1" src="../../static/bg_buy_btn_grey.png"></image>
										
										<text class="font-333-24 font-weight-600 mr-16" 
										style="z-index: 40;"
										 v-if="actItem.checkFar == 1">距离过远</text>
										<text class="font-fff-24 font-weight-600 mr-28" style="z-index: 40;"
										v-if="actItem.checkFar != 1 && actItem.checkStatus == 1
										 && actItem.surplusCount == 1">报名</text>
										<text class="font-333-24 font-weight-600 mr-28" style="z-index: 40;"
										v-else-if="actItem.checkFar != 1 && actItem.checkStatus == 1
										&& actItem.surplusCount > 0">报名</text>
										<text class="font-666-24 mr-16" style="z-index: 40;"
										v-if="actItem.checkFar != 1 && actItem.checkStatus == 1 && actItem.surplusCount < 1">已售罄</text> 
										<text class="font-666-24 mr-16" style="z-index: 40;"
										v-if="actItem.checkFar != 1 && actItem.checkStatus == 0">未开始</text>
										<text class="font-666-24 mr-16" style="z-index: 40;"
										v-if="actItem.checkFar != 1 && actItem.checkStatus == 2">已结束</text>
										<text class="font-666-24 mr-16" style="z-index: 40;"
										v-if="actItem.checkFar != 1 && actItem.checkStatus == 3">已结算</text>
									</view>
								</view>
								
							</view>
						</view>
						
					</view>
				</view>
				<NoData v-if="dataList.length < 1" type="index" style="margin-top: 94rpx;"></NoData>
			</view>
		</view>
		
		
		
		<groupImgWindow ref="groupImgWindow" ></groupImgWindow>
		
		
		<view class="act-cate-list-box" v-if="showAllCate" @click="showAllCate = false" catchtouchmove="true">
			<view class="cate-list-inner">
				<text class="font-333-32 font-weight-600" style="margin-left: 8rpx;margin-bottom: 20rpx;">
					店铺品类
				</text>
				<view class="cate-list-container">
					<view class="single-cate-container" v-for="(cateItem , cateIndex) in allCateList" 
					:key="cateIndex" @click="changeChosenCate(cateItem)">
						<text class="chosen-single-cate" v-if="cateItem == chosenCate">{{cateItem}}</text>
						<text class="single-cate" v-else>{{cateItem}}</text>
					</view>
				</view>
			</view>
		</view>
		
		<!-- 去店铺点餐弹窗 -->
		<view class="to-shop-window" v-if="showToShopWindow" catchtouchmove="true">
			<view class="to-shop-box">
				<image class="to-shop-shadow-bg" src="../../static/bg_shadow_buy_window.png"></image>
				<text class="font-333-36 font-weight-600">去店铺点餐</text>
				<image class="shop-code-img" :src="chosenShopCodeImg" :show-menu-by-longpress="true"></image>
				<view class="row-container" style="position: relative;">
					<image src="../../static/bg_long_divider.png" class="long-divider"></image>
					<text class="font-333-28" style="font-weight: bold;z-index: 101;">长按二维码，进入店铺点餐</text>
				</view>
				
				<text class="font-666-28" style="padding: 32rpx;" @click="showToShopWindow=false">我再想想</text>
			</view>
		</view>
		
		<!-- 没有定位权限 -->
		<NoLocation v-if="showNoLocation" style="margin-top: 94rpx;" type="index"></NoLocation>
		
		<!-- 获取vip弹窗 -->
		<view class="vip-window-main" v-if="showVipWindow" style="z-index: 2000;">
			<view class="vip-window">
				<image class="vip-bg" src="../../static/bg_get_vip_window.png"></image>
				<image class="vip-name" src="../../static/ic_vip_name.png"></image>
				<image class="vip-title" src="../../static/ic_vip_title.png"></image>
				<view class="row-container mt-16" style="z-index: 1001;">
					<image class="vip-line mr-10" src="../../static/ic_vip_line_left.png"></image>
					<text class="font-661E1E-28">有效期至{{vipLimitTime ? vipLimitTime : '2024年12月31日'}}</text>
					<image class="vip-line ml-10" src="../../static/ic_vip_line_right.png"></image>
				</view>
				<view class="vip-rights-box">
					<view class="row-container">
						<view class="vip-line-left"></view>
						<text class="font-661E1E-32 font-weight-600">会员权益</text>
						<view class="vip-line-right"></view>
					</view>
					<view class="row-container mt-40">
						<image class="wh-70" src="../../static/ic_extra_bonus.png"></image>
						<view class="column-container ml-24">
							<text class="font-661E1E-28 font-weight-600">额外奖励金</text>
							<text class="font-661E1E-24">每单额外获得2元奖励金</text>
						</view>
					</view>
					<view class="row-container mt-28">
						<image class="wh-70" src="../../static/ic_change_order.png"></image>
						<view class="column-container ml-24">
							<text class="font-661E1E-28 font-weight-600">修改订单</text>
							<text class="font-661E1E-24">获得额外修改订单机会</text>
						</view>
					</view>
					<view class="row-container mt-28">
						<image class="wh-70" src="../../static/ic_bonus_withdraw.png"></image>
						<view class="column-container ml-24">
							<text class="font-661E1E-28 font-weight-600">奖励金提现</text>
							<text class="font-661E1E-24">奖励金提现至微信零钱</text>
						</view>
					</view>
				</view>
				<view class="get-btn" @click="gotoMinePage">
					我知道了
				</view>
			</view>
			<image class="close-window" src="../../static/ic_close_white.png" @click="showVipWindow = false"></image>
		</view>
		
		<!-- 公告弹窗-->
		<view class="vip-window-main" v-if="showNoticeWindow">
			<view class="notice-window">
				<image class="notice-bg" :src="noticeWindowBg"></image>
				<text class="notice-title">{{noticeDetail.title}}</text>
				<text class="notice-content">{{noticeDetail.intro}}</text>
				<text class="check-notice" @click="gotoCheckNotice">查看详情</text>
			</view>
			<image class="close-window" src="../../static/ic_close_white.png" @click="handleCloseNoticeWindow"></image>
		</view>
		
	</view>
</template>

<script>
	import NoData from '@/components/nodata.vue'
	import NoLocation from '@/components/noLocation.vue'
	import QQMapWx from '../../assets/qqmap-wx-jssdk.js'
	import groupImgWindow from '../../components/groupImgWindow.vue'
	
	import AmapFile from '../../assets/amap-wx.130.js'
	import config from '../../utils/config.js'
	
	
	export default {
		data() {
			return {
				showWelcomeBg:true,
				
				aMap:null , 
				
				openId : '' , // 静默授权拿到的openId
				
				dataList:[] , // 首页活动数据
				longitude:'' , // 经度
				latitude:'' , //纬度
				page : 1,
				hasMoreData:false,
				addressStr:'获取定位' , // 经过腾讯地图SDK解析后的地址
				
				clickTime:0, // 点击事件  间隔要超过500毫秒
				
				shareOrderId:"" , //分享进入的订单详情
				
				showAllCate:false , //是否显示全部分类
				allCateList:[] , // 全部分类的列表
				
				hasFlow:false, //是否开启筛选悬浮
				chosenCate:'全部品类' ,// 当前选择的品类名称
				checkHigh:0 , //  是否高价  0 / 1
				checkComment:0 , // 是否评价  0 / 1
				checkUse:0 , // 是否可抢  0  / 1
				
				shopList:[] , // 热门店铺列表
				chosenShopCodeImg:'' , //当前点击的店铺二维码图片
				showToShopWindow:false , //显示当前点击的店铺二维码
				
				bannerList:[],
				
				showNoLocation: false,
				
				articleUrl:'' , //新手教程的链接
				eleUrl:'' , //饿了么活动的链接
				meituanUrl:'' , //美团活动的链接
				
				inviteUserId : '',
				showVipWindow:false , // 领取vip弹窗
				showNoticeWindow:false , 
				noticeWindowBg:'https://jxshoss.oss-cn-qingdao.aliyuncs.com/common/20240423113339.png' ,
				noticeDetail:null,
				
				startJuli:0 , // 官方霸王餐的分页参数
				pagePvId:'' ,// 官方霸王餐的分页参数
				couponBgUrl:'https://jxshoss.oss-cn-qingdao.aliyuncs.com/common/20240524102538.png',
				
				vipLimitTime:'' , // 赠送会员的到期时间
				cityName:'' , // 城市名称
				addressName:'' , // 定位地址
				
			}
		},
		components:{
			NoData,
			groupImgWindow,
			NoLocation
		},
		
		onShareAppMessage(res) {
			let that = this
			return{
				title:'参与最星城霸王餐平台活动，5元吃外卖！',
				path:'/pages/index/index?inviteUserId=' + that.cookie.get("jx_userId"),
				imageUrl:'https://jxshoss.oss-cn-qingdao.aliyuncs.com/common/20240423151942.png'
			}
		},
		
		onShow() {
			this.loadGroupImgAndCount()
			if (!this.cookie.get('jx_token')){
				this.handleAuth()
			}
		},
		
		onLoad(options) {
			// #ifdef MP
				if (this.cookie.get("jx_userId") && 
				(this.cookie.get("jx_userId") == 21 || this.cookie.get('jx_userId') == 24)){
					wx.onCopyUrl(() => {
						return { query: 'inviteUserId=' + this.cookie.get("jx_userId") }
					})
				}
			// #endif
			let that = this
			
			uni.hideTabBar()
			setTimeout(()=>{
				that.showWelcomeBg = false
				setTimeout(()=>{
					uni.showTabBar()	
				},200)
			}, 3500)
			
			if (options.inviteUserId){
				this.inviteUserId = options.inviteUserId
				this.cookie.set("jx_inviteUserId" , options.inviteUserId)
			}
			
			if (options.shareOrderId){
				this.cookie.set("jx_shareOrderId" , options.shareOrderId)
			}
			
			this.aMap = new AmapFile.AMapWX({key:config.amapKey})
			
			uni.$on("refreshIndex" , ()=>{
				that.page = 1
				that.startJuli = 0
				that.pagePvId = ""
				
				that.loadBanner()
				that.loadIndexList()
				that.loadAllCateList()
			})
			
			uni.$on("changeAddress" , (data)=>{
				that.addressStr = data.addressStr
				that.latitude = data.latitude
				that.longitude = data.longitude
				
				that.cookie.set("jx_lng" , that.longitude)
				that.cookie.set("jx_lat" , that.latitude)
				
				that.loadGroupImgAndCount()
				
				that.loadBanner()
				that.page = 1
				that.startJuli = 0
				that.pagePvId = ""
				that.loadIndexList()
			})
			
			uni.$on("openGroupImgWindow" , (data)=>{
				if (data == "index"){
					that.$refs.groupImgWindow.showGroupImg = true
				}
			})
			
			uni.$on("openLocationSuccess" , () =>{
				that.showNoLocation = false
				that.getLocation()
			})
			if (this.cookie.get('jx_token')){
				this.loadNotice()
			}
			this.getServiceUrl()
			this.getMenuList()
			this.checkLocation()
			this.loadAllCateList()
		},
		
		onHide() {
			// #ifdef MP
				if (this.cookie.get("jx_userId") && 
				(this.cookie.get("jx_userId") == 21 || this.cookie.get('jx_userId') == 24)){
					wx.offCopyUrl()
				}
			// #endif
		},
		
		onPullDownRefresh() {
			this.page = 1
			this.startJuli = 0
			this.pagePvId = ""
			this.loadBanner()
			this.loadIndexList()
			this.loadAllCateList()
		},
		
		onReachBottom() {
			console.log('index---onreachBottom===')
			if (this.hasMoreData){
				this.page ++
				this.loadIndexList()
			}
		},
		
		onPageScroll(res) {
			if (res.scrollTop >= 270){
				this.hasFlow = true
			} else{
				this.hasFlow = false
			}
		},
		
		methods: {
			//获取未读公告
			loadNotice(){
				let that = this
				this.http({
					url:'/notice/findLastNotice',
					method:'POST',
					hideLoading:true,
					data:{
						tagType : this.config.noticeTagType
					},
					success(res){
						if(res.code == 200){
							that.noticeDetail = res.data
							if (that.noticeDetail){
								that.showNoticeWindow = true
							}
						}
					},
					failed(e){
					}
				})
			},
			
			//关闭公告弹窗
			handleCloseNoticeWindow(){
				this.noticeDetail = null
				this.showNoticeWindow = false
			},
			
			//查看公告详情
			gotoCheckNotice(){
				if (!this.noticeDetail.id){
					return
				}
				this.showNoticeWindow = false
				uni.navigateTo({
					url:'/pages/mine/noticeDetail?noticeId=' + this.noticeDetail.id
				})
			},
			
			//获取客服微信url
			getServiceUrl(){
				let that = this
				this.http({
					url:'/common/getZxcKefuUrl',
					method:'POST',
					hideLoading:true,
					data:{
					},
					success(res){
						if(res.code == 200){
							that.cookie.set("customServiceUrl" , res.data)
							console.log('ser-----' + that.cookie.get('customServiceUrl'))
						}
					},
					failed(e){
					}
				})
			},
			
			//获取顶部四个菜单的链接
			getMenuList(){
				let that = this
				this.http({
					url:'/common/menuList',
					method:'POST',
					hideLoading:true,
					data:{
					},
					success(res){
						if(res.code == 200){
							that.articleUrl = res.data.articleUrl
							that.eleUrl = res.data.eleUrl
							that.meituanUrl = res.data.meituanUrl
							
							that.cookie.set("meituanCouponUrl" , that.meituanUrl)
							that.cookie.set("eleCouponUrl" , that.eleUrl)
						}
					},
					failed(e){
					}
				})
			},
			
			//检测是否有定位权限
			checkLocation(){
				let that = this
				uni.getSetting({
					success(res0) {
						//没有调起过定位
						if (!Object.keys(res0.authSetting).includes('scope.userLocation')) {
							that.showNoLocation = false
							that.getLocation()
							return
						}
						//已经调起了授权 并且已拒绝
						if (!res0.authSetting['scope.userLocation']) {
							that.showNoLocation = true
							that.loadBanner()
						} else{
							that.showNoLocation = false
							that.getLocation()
						}	
						
					},
					fail(e) {
						console.log('getSetting--failed---' + JSON.stringify(e))
					}
					
				})
			},
			
			getLocation(){
				let that = this
				uni.authorize({
					scope:'scope.userLocation',
					success(authRes) {
						console.log('authorize----' + JSON.stringify(authRes))
						uni.getLocation({
							type:"gcj02",
							// isHighAccuracy:'true',
							success(locationRes) {
								console.log('location--------',JSON.stringify(locationRes))
								that.longitude = locationRes.longitude
								that.latitude = locationRes.latitude
								that.cookie.set("jx_lng" , that.longitude)
								that.cookie.set("jx_lat" , that.latitude)
								
								that.page = 1
								that.loadBanner()
								that.loadIndexList()
								that.loadGroupImgAndCount()
								
								that.aMap.getRegeo({
									location:that.longitude + "," + that.latitude,
									success(aMapRes){
										console.log("解析地址成功---", aMapRes);
										if (aMapRes && aMapRes.length > 0){
											that.cityName = aMapRes[0].regeocodeData.addressComponent.city
											that.addressStr = aMapRes[0].desc
											that.addressName = aMapRes[0].name
											that.handleCommitLocation()
										}
									}, 
									failed(aMapErr){
										console.log('amap--failed---' , aMapErr)
									}
								})
								
								
							},
							fail(e) {
								console.log("location---获取经纬度失败---")
							},
							complete() {
								
							}
						})
					},
					fail(authErr) {
						that.showNoLocation = true
					}
				})
			},
			
			//上传经纬度及地址
			handleCommitLocation(){
				let that = this
				
				if (!this.cookie.get('jx_token') || !this.latitude 
				|| !this.longitude || !this.addressName){
					return
				}
				
				this.http({
					url:'/user/updateUserInfo',
					method:'POST',
					hideLoading:true,
					data:{
						cityName : that.addressName,
						longitude : that.longitude,
						latitude : that.latitude
					},
					success(res){
					},
					failed(e){
					}
				})
			},
			
				
			//修改分类弹窗显示
			changeAllCateShow(){
				let that = this
				if (!this.showAllCate){
					uni.pageScrollTo({
						scrollTop:340,
						success() {
							that.showAllCate = true
						}
					})
				} else{
					this.showAllCate = false
				}
				
			},
			
			//点击顶部四个按钮  type 0 美团红包  1饿了么红包  2内部福利群  3新手教程
			handleClickCouponItem(type){
				if (type == 0){
					if (this.meituanUrl){
						uni.navigateToMiniProgram({
							appId:'wxde8ac0a21135c07d',
							path:this.meituanUrl,
							success() {
							} 
						})
					}
					
				} else if (type == 1){
					if (this.eleUrl){
						uni.navigateToMiniProgram({
							appId:'wxece3a9a4c82f58c9',
							path: this.eleUrl,
							success() {
							}
						})
					}
				} else if (type == 2){
					this.$refs.groupImgWindow.showGroupImg = true
				} else if (type == 3){
					if (this.articleUrl){
						uni.navigateTo({
							url:'/pages/index/web?webUrl=' + encodeURIComponent(this.articleUrl)
						})
					}
				} 
			},
			
			//修改当前选择的分类
			changeChosenCate(cate){
				this.chosenCate = cate
				this.page = 1
				this.startJuli = 0
				this.pagePvId = ""
				this.loadActivityList()
			},
			
			//修改是否高额返现
			changeCheckHigh(checkHigh){
				this.checkHigh = checkHigh
				this.page = 1
				this.startJuli = 0
				this.pagePvId = ""
				this.loadActivityList()
			},
			
			//修改是否需要评价
			changeCheckComment(checkComment){
				this.checkComment = checkComment
				this.page = 1
				this.startJuli = 0
				this.pagePvId = ""
				this.loadActivityList()
			},
			
			//修改只看可用
			changeCheckUse(checkUse){
				this.checkUse = checkUse
				this.page = 1
				this.startJuli = 0
				this.pagePvId = ""
				this.loadActivityList()
			},
			
			//点击banner
			handleClickBanner(bannerItem){
				if (bannerItem.type == 1){  // H5
					uni.navigateTo({
						url:'/pages/index/web?webUrl=' + encodeURIComponent(bannerItem.linkUrl)
					})
				} else if (bannerItem.type == 2){// 外部小程序
					if (bannerItem.appid && bannerItem.linkUrl){
						uni.navigateToMiniProgram({
							appId:bannerItem.appid,
							path:bannerItem.linkUrl,
						})
					}
				} else if (bannerItem.type == 3){// 内部小程序
					uni.navigateTo({
						url:linkUrl
					})
				}
			},
			
			//由跳转地址页面 改为直接选择位置
			gotoAddress(){
				// uni.navigateTo({
				// 	url:"/pages/index/address"
				// })
				let that = this
				uni.chooseLocation({
					longitude:this.longitude,
					latitude:this.latitude,
					success(res) {
						console.log('chooseLocation----' , JSON.stringify(res) + '     ' + that.cityName)
						
						if (!res.name){
							return
						}
						
						if (!res.address.includes(that.cityName)){
							uni.showModal({
								title:'温馨提示',
								content:'不能切换到定位之外的其它城市',
								showCancel:false
							})
							return
						}
						
						that.addressStr = res.name
						that.latitude = res.latitude
						that.longitude = res.longitude
						
						that.cookie.set("jx_lng" , that.longitude)
						that.cookie.set("jx_lat" , that.latitude)
						
						that.loadGroupImgAndCount()
						
						that.loadBanner()
						
						that.startJuli = 0
						that.pagePvId = ""
						
						that.page = 1
						that.loadIndexList()
						
					},
					fail(err) {
						console.log('choosen--location---fail---' , err)
					}
				})
				
			},
			
			gotoSearchAct(){
				uni.navigateTo({
					url:'/pages/index/searchAct'
				})
			},
			
			gotoSearchShop(){
				uni.navigateTo({
					url:'/pages/index/searchShop'
				})
			},
			
			//进入活动详情  首先调用接口确认是否此活动已有订单  
			gotoActDel(item , distanceStr){
				let nowTimeMills = new Date().getTime();
				if (this.clickTime > 0 && nowTimeMills - this.clickTime < 500){
					return
				}
				this.clickTime = nowTimeMills
				
				if (item.checkStatus == 2 || item.checkStatus == 3){ // 已结束已结算
					return 
				}
				if (item.surplusCount < 1){  // 已售罄
					return
				}
				
				if (item.id){
					if (item.checkFar == 1){ // 距离过远
						return
					}
					//type为2 跳转到好评返现的活动
					if (item.type == 2){
						uni.navigateTo({
							url:'/pages/index/commentActDel?actId=' + item.id
						})
					} else{
						uni.navigateTo({
							url:'/pages/index/activityDetail?actId=' + item.id
						})
					}
					
				} else{
					uni.navigateTo({
						url:'/pages/index/officialActDet?actData=' + encodeURIComponent(JSON.stringify(item)) 
						+ "&distanceStr=" + distanceStr
					})
				}
				
			},
			
			//加载banner
			loadBanner(){
				let that = this
				this.http({
					url:'/common/bannerList',
					method:'POST',
					hideLoading:true,
					data:{
						latitude:that.latitude,
						longitude:that.longitude
					},
					success(res){
						if (res.code == 200){
							that.bannerList = res.data
						}
					},
					failed(e){
					}
				})
			},
			
			//加载全部分类列表
			loadAllCateList(){
				let that = this
				this.http({
					url:'/common/categoryList',
					method:'POST',
					hideLoading:true,
					data:{},
					success(res){
						if (res.code == 200){
							that.allCateList = []
							
							that.allCateList.push("全部品类")
							that.allCateList = that.allCateList.concat(res.data)
						}
					},
					failed(e){
					}
				})
			},
			
			//根据当前tab  加载列表数据
			loadIndexList(){
				this.loadActivityList()
			},
			
			//加载活动列表
			loadActivityList(){
				let that = this
				this.http({
					url:'/common/active/new/activeList',
					method:'POST',
					hideLoading:true,
					data:{
						latitude : that.latitude,
						longitude : that.longitude,
						pageNo : that.page,
						pageSize : 10,
						categoryName : that.chosenCate,
						checkHigh:that.checkHigh,
						checkComment:that.checkComment,
						checkUse:that.checkUse,
						startJuli:that.startJuli,
						pagePvId:that.pagePvId
					},
					success(res){
						if (res.code == 200){
							//   如果选择的是只看可抢  则需要判断是否已售罄  
							if (that.checkUse == 1){
								if (that.page == 1){
									that.dataList = []
								}
								for (let i = 0 ; i < res.data.length ; i++){
									let actList = []
									let shopItem = res.data[i]
									for (let j = 0 ; j < shopItem.activeList.length ; j++){
										let actItem = shopItem.activeList[j]
										if (actItem.surplusCount >= 1){
											actList.push(actItem)
										}
									}
									if (actList.length > 0){
										shopItem.activeList = actList
										that.dataList.push(shopItem)
									}
								}
							} else {
								if (that.page == 1){
									that.dataList = res.data
								} else{
									that.dataList = [...that.dataList, ...res.data]
								}
							}
							
							if (that.dataList.length > 0){
								that.startJuli = that.dataList[that.dataList.length - 1].distanceNum
								// that.pagePvId = that.dataList[that.dataList.length - 1].pagePvId
							
								for (let i = 0 ; i < that.dataList.length ; i++){
									if (!that.dataList[i].id && that.dataList[i].pagePvId){
										that.pagePvId = that.dataList[i].pagePvId
										break
									}
								}
							}
							that.hasMoreData = res.data.length >= 1
						}
						uni.stopPullDownRefresh()
						uni.hideLoading()
					},
					failed(e){
						uni.stopPullDownRefresh()
						uni.hideLoading()
					}
					
				})
			},
			
			loadGroupImgAndCount(){
				let that = this
				this.http({
					url:'/common/platform/img',
					method:'POST',
					hideLoading:true,
					data:{
						longitude : that.longitude,
						latitude : that.latitude
					},
					success(res){
						if (res.code == 200 && res.data){
							getApp().globalData.groupId = res.data.id
							getApp().globalData.groupPeopleCount = res.data.joinCount
							getApp().globalData.groupImg = res.data.platformImg
							getApp().globalData.address = res.data.address
							uni.$emit("updateGroupInfo")
						}
					},
					failed(e){
					}
				})
			},
			
			//静默授权
			handleAuth(){
				let that = this
				uni.login({
					success(loginRes) {
						let loginCode = loginRes.code
						let dataParams = {
							code:loginCode
						}
						if (that.cookie.get("jx_inviteUserId")){
							that.$set(dataParams , "inviteUserId" ,that.cookie.get("jx_inviteUserId"))
						}
						console.log("jx_shareOrderId----" + that.cookie.get("jx_shareOrderId"))
						if (that.cookie.get("jx_shareOrderId")){
							that.$set(dataParams , "orderId" , that.cookie.get("jx_shareOrderId"))
						}
						
						that.http({
							url: "/common/wx/getopenId",
							method: "GET",
							data: dataParams,
							success: userRes  => {
								if (userRes.code === 200){
									that.openId = userRes.data.unionid
									
									that.cookie.set('jx_openId' , that.openId)
									that.handleLogin(userRes.data.checkNewUser)
								}
							},
							fail: err => {
								
							}
						})
					}
				})
			},
			
			handleLogin(checkNewUser){
				let that = this
				this.http({
					url:"/login/submit",
					method:"POST",
					data:{
						username: that.openId,
						password: that.openId,
					},
					success(res) {
						if (res.code == 200){
							that.cookie.set("jx_token" , res.data.token)
							that.cookie.set("jx_userInfo" , res.data)
							that.cookie.set('jx_userId' , res.data.userId)
							
							that.vipLimitTime = res.data.vipTime
							that.showVipWindow = checkNewUser == 1
							
							that.handleCommitLocation()
							
							uni.$emit("authSuccess")
						}
					},
					fail(e) {
					}
				})
			},
			
			gotoMinePage(){
				this.showVipWindow = false
				uni.switchTab({
					url:'/pages/mine/index'
				})
			}
		}
	}
</script>

<style lang="scss">
	
	.index-page{
		display: flex;
		flex-direction: column;
		width: 100%;
		height: 100%;
		min-height: 100vh;
		position: relative;
		background: #F5F5F5;
	}
	
	.welcome-bg{
		width: 100%;
		height: 100vh;
		z-index: 10000;
		position: fixed;
		top: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background: #FFF6CD;
		
		.welcome-ic{
			width: 538rpx;
			height: 764rpx;
		}
	}
	
	.top-box{
		width: 100%;
		height: 88rpx;
		padding-top: 100rpx;
		background-color: white;
		display: flex;
		flex-direction: row;
		align-items: center;
		position: fixed;
		z-index: 80;
	}
	
	.act-cate-box{
		display: flex;
		flex-direction: row;
		align-items: center;
		width: calc(100% - 50rpx);
		height: 94rpx;
		margin: 0rpx 25rpx;
		position: absolute;
		top: 738rpx;
		z-index: 42;
	}
	
	.act-cate-box-fixed{
		display: flex;
		flex-direction: row;
		align-items: center;
		width: calc(100% - 50rpx);
		height: 94rpx;
		padding: 0rpx 25rpx;
		position: fixed;
		top: 188rpx;
		background: white;
		z-index: 42;
	}
	
	.all-cate-box-white{
		width: 146rpx;
		height: 54rpx;
		background: white;
		border-radius: 16rpx;
		margin-left: 5rpx;
		margin-right: 5rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}
	
	.all-cate-box-grey{
		width: 146rpx;
		height: 54rpx;
		background: #F5F5F5;
		border-radius: 16rpx;
		margin-left: 5rpx;
		margin-right: 5rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}
	
	.grey-cate-box{
		height: 54rpx;
		flex-grow: 1;
		background: #F5F5F5;
		border-radius: 16rpx;
		margin-left: 5rpx;
		margin-right: 5rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}
	
	.white-cate-box{
		height: 54rpx;
		flex-grow: 1;
		background: white;
		border-radius: 16rpx;
		margin-left: 5rpx;
		margin-right: 5rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}
	
	.green-cate-box{
		height: 54rpx;
		flex-grow: 1;
		background: #FFC01F;
		border-radius: 16rpx;
		margin-left: 5rpx;
		margin-right: 5rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}
	
	.search-ic{
		width: 22rpx;
		height: 22rpx;
		margin-right: 8rpx;
	}
	
	.arrow-down{
		width: 18rpx;
		height: 18rpx;
	}
	
	.act-cate-list-box{
		display: flex;
		flex-direction: column;
		width: 100%;
		height: 90vh;
		background: rgba(0, 0, 0, 0.6);
		position: fixed;
		top: 280rpx;
		z-index: 50;
		
		.cate-list-inner{
			display: flex;
			flex-direction: column;
			width: calc(100% - 44rpx);
			background-color: white;
			padding: 20rpx 22rpx 14rpx 22rpx;
			
			.cate-list-container{
				display: flex;
				flex-direction: row;
				width: 100%;
				flex-wrap: wrap;
				
				.single-cate-container{
					width: calc(25% - 16rpx);
					height: 56rpx;
					display: flex;
					flex-direction: row;
					align-items: center;
					justify-content: center;
					margin: 0rpx 8rpx 16rpx 8rpx;
				}
				
				.single-cate{
					width: 100%;
					height: 56rpx;
					background: #F5F5F5;
					border-radius: 16rpx;
					text-align: center;
					line-height: 56rpx;
					font-size: 24rpx;
					color: #333333;
					
				}
				
				.chosen-single-cate{
					width: 100%;
					height: 56rpx;
					background: #FFC01F;
					border-radius: 16rpx;
					text-align: center;
					line-height: 56rpx;
					font-size: 24rpx;
					color: #333333;
					font-weight: bold;
				}
			}
			
		}
	}
	
	.location-ic{
		width: 40rpx;
		height: 40rpx;
		margin-right: 4rpx;
		margin-left: 30rpx;
	}
	
	.location-text{
		max-width: 300rpx;
		font-size: 32rpx;
		color: #333333;
		font-weight: 600;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}
	
	.arrow-ic{
		width: 16rpx;
		height: 16rpx;
		margin-left: 10rpx;
	}
	
	.top-img-box{
		width: 100%;
		height: 220rpx;
		background: linear-gradient(to bottom , #FFFFFF , #F5F5F5);
		display: flex;
		flex-direction: column;
		align-items: center;
		margin-top: 188rpx;
		
		.swiper-box{
			width: calc(100% - 60rpx);
			height: 220rpx;
			margin-left: 30rpx;
			margin-right:30rpx
		}
	}
	.top-container-img{
		width: 100%;
		height: 220rpx;
		border-radius: 16rpx;
	}
	
	.coupon-main{
		display: flex;
		flex-direction: column;
		align-items: center;
		width: calc(100% - 60rpx);
		height: 298rpx;
		margin: 30rpx 30rpx 0rpx 30rpx;
		position: relative;
		
		.coupon-bg{
			width: 100%;
			height: 298rpx;
			position: absolute;
		}
		
	}
	
	.coupon-box{
		display: flex;
		flex-direction: row;
		width: calc(100% - 20rpx);
		height: 208rpx;
		background: rgba(255 , 255 , 255 , 0.95);
		border-radius: 16rpx;
		z-index: 50;
		position: absolute;
		bottom: 10rpx;
		
		.coupon-item{
			display: flex;
			flex-direction: column;
			flex-grow: 1;
			height: 208rpx;
			align-items: center;
			justify-content: center;
			position: relative;
			
			.coupon-img{
				width: 84rpx;
				height: 84rpx;
				margin-bottom: 16rpx;
			}
		}
		
	}
	
	.data-item{
		display: flex;
		flex-direction: column;
		width: calc(100% - 100rpx);
		margin-left: 30rpx;
		margin-right: 30rpx;
		margin-bottom: 20rpx;
		padding: 20rpx;
		background-color: white;
		border-radius: 16rpx;
		position: relative;
		
		.single-tag{
			width: 80rpx;
			height: 80rpx;
			position: absolute;
			top: 0;
			right: 0;
			z-index: 30;
		}
		
		.item-img-box{
			display: flex;
			flex-direction: row;
			width: 190rpx;
			height: 190rpx;
			border-radius: 10rpx;
			margin-right: 20rpx;
			flex-shrink: 0;
			position: relative;
			.item-img{
				width: 190rpx;
				height: 190rpx;
				border-radius: 10rpx;
				flex-shrink: 0;
			}
			.brand-tag{
				width: 56rpx;
				height: 32rpx;
				position: absolute;
				left: 0;
				top: 0;
				color: white;
				font-weight: 600;
				text-align: center;
				line-height: 32rpx;
				font-size: 20rpx;
				background: linear-gradient(90deg, #F83131 0%, #FF6D3F 100%);
				border-top-left-radius: 10rpx;
				border-bottom-right-radius: 10rpx;
				z-index: 10;
			}
		}
		
		.brand-img{
			width: auto;
			height: 32rpx ;
			margin-top: 8rpx;
			margin-right: 11rpx;
		}
		
		.shop-name{
			font-weight: 600;
			font-size: 36rpx;
			color: #333333;
			text-overflow: ellipsis;
			white-space: nowrap;
			overflow: hidden;
			max-width: 450rpx;
		}
		
		.progress-bar{
			width: 56rpx;
			height: 10rpx;
			border-radius: 10rpx;
		}
		
		
		.act-item{
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-between;
			width: 100%;
			height: 80rpx;
			margin-top: 24rpx;
			position: relative;

			.act-bg{
				width: 100%;
				height: 80rpx;
				position: absolute;
			}
			
			.buy-box{
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: flex-end;
				width: 119rpx;
				height: 80rpx;
				position: relative;
				
				.buy-bg{
					width: 100%;
					height: 100%;
					position: absolute;
				}
			}
			
			.red-tag{
				background: #FFF5ED;
				border: #FFD9C6 1rpx solid;
				height: 42rpx;
				line-height: 40rpx;
				text-align: center;
				padding: 0rpx 9rpx;
				color: #FF621F;
				font-weight: bold;
				font-size: 22rpx;
				border-radius: 8rpx;
				margin-left: 10rpx;
			}
			
			.blue-tag{
				background: #E6F9FF;
				border: #B1ECFF 1rpx solid;
				height: 42rpx;
				line-height: 40rpx;
				text-align: center;
				padding: 0rpx 9rpx;
				color: #4BA2E9;
				font-weight: bold;
				font-size: 22rpx;
				border-radius: 8rpx;
				margin-left: 10rpx;
			}
		}
	}
	
	.to-shop-window{
		width: 100%;
		height: 100vh;
		position: fixed;
		top: 0;
		z-index: 100;
		background: rgba(0, 0, 0, 0.5);
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		
		.to-shop-box{
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			width: calc(100% - 148rpx);
			margin-left: 74rpx;
			margin-right: 74rpx;
			padding-top: 44rpx;
			background: white;
			border-radius: 30rpx;
			position: relative;
			
			.to-shop-shadow-bg{
				width: 100%;
				height: 220rpx;
				position: absolute;
				top: 0;
				left: 0;
			}
			
			.shop-code-img{
				width: 380rpx;
				height: 380rpx;
				margin-top: 44rpx;
				margin-bottom: 32rpx;
			}
			
			.long-divider{
				position: absolute;
				top: 28rpx;
				width: 333rpx;
				height: 9rpx;
			}
			
		}
		
	}
	
	.list-box{
		display: flex;
		flex-direction: column;
		width: 100%;
		margin-top: 94rpx;
		min-height: 90vh;
	}
	
	.list-box-invite{
		display: flex;
		flex-direction: column;
		width: 100%;
		margin-top: 314rpx;
		min-height: 90vh;
	}
	
	
	.vip-window-main{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100vh;
		position: fixed;
		z-index: 1000;
		background: rgba(0, 0, 0, 0.6);
		
		.vip-window{
			width: 602rpx;
			height: 1066rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			position: relative;
			
			.vip-bg{
				width: 100%;
				height: 100%;
				position: absolute;
			}
			
			.vip-name{
				width: 218rpx;
				height: 48rpx;
				position: absolute;
				top: 121rpx;
				left: 29rpx;
				z-index: 1001;
			}
			
			.vip-title{
				width: 480rpx;
				height: 152rpx;
				margin-top: 217rpx;
				z-index: 1001;
			}
			
			.vip-line{
				width: 32rpx;
				height: 4rpx;
			}
			
			.vip-rights-box{
				width: 514rpx;
				display: flex;
				flex-direction: column;
				align-items: center;
				background: white;
				border-radius: 30rpx;
				margin: 26rpx 0rpx;
				padding: 30rpx 0rpx 40rpx 0rpx;
				z-index: 1001;
			}
			
			.vip-line-left{
				width: 32rpx;
				height: 2rpx;
				background: linear-gradient(90deg, rgba(204, 60, 60, 0) 0%, #661E1E 100%);
				margin-right: 13rpx;
			}
			
			.vip-line-right{
				width: 32rpx;
				height: 2rpx;
				background: linear-gradient(90deg, #661E1E 0%, rgba(204, 60, 60, 0) 100%);
				margin-left: 13rpx;
			}
			
			.get-btn{
				width: 434rpx;
				height: 88rpx;
				position: absolute;
				bottom: 0rpx;
				z-index: 1001;
				text-align: center;
				line-height: 88rpx;
				background-image: url('../../static/ic_get_vip.png');
				background-size: cover;
				color: #661E1E;
				font-size: 36rpx;
				font-weight: 600;
			}
			
		}
		
		.notice-window{
			display: flex;
			flex-direction: column;
			align-items: center;
			width: 602rpx;
			height: 808rpx;
			position: relative;
			
			.notice-bg{
				width: 602rpx;
				height: 808rpx;
				position: absolute;
			}
			
			.notice-title{
				color: #333333;
				font-size: 36rpx;
				font-weight: 600;
				line-height: 50rpx;
				z-index: 1001;
				margin-top: 360rpx;
				margin-bottom: 24rpx;
			}
			
			.notice-content{
				color: #666666;
				font-size: 28rpx;
				z-index: 1001;
				margin: 0rpx 44rpx;
				text-align: center;
				line-height: 39rpx;
				display: -webkit-box;
				-webkit-line-clamp: 4;
				-webkit-box-orient: vertical;
				overflow: hidden;
			}
			
			.check-notice{
				width: calc(100% - 150rpx);
				height: 88rpx;
				background: linear-gradient(89.93deg, #938CD4 1.2%, #655EAB 98.94%);
				text-align: center;
				line-height: 88rpx;
				color: white;
				font-size: 36rpx;
				font-weight: 600;
				position: absolute;
				bottom: 66rpx;
				z-index: 1001;
				border-radius: 44rpx;
			}
		}
		
		.close-window{
			width: 76rpx;
			height: 76rpx;
			margin-top: 40rpx;
		}
		
	}
	
	
	button::after {
		border: none;//去除边框
	}
	
</style>	
